package com.wfh.aiagent.condition;

import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @Title: MemoryVectorStoreCondition
 * @Author wangfenghuan
 * @Package com.wfh.aiagent.condition
 * @Date 2025/10/23 22:22
 * @description:
 */
public class MemoryVectorStoreCondition implements Condition {
    @Override
    public boolean matches(ConditionContext context, @NotNull AnnotatedTypeMetadata metadata) {
        String storeType = context.getEnvironment().getProperty("ai.vector-store.type", "memory");
        return "memory".equals(storeType);
    }
}
